package xyz.xmh.pattern.behavioral.nullobjectpattern;

/**
 * @author Administrator
 * <p>
 * 空对象模式演示类
 */
public class NullObjectPatternDemo {

    public static void main(String[] args) {
        // 使用工厂方法，获取顾客对象
        AbstractCustomer customer1 = CustomerFactory.getCustomer("Rob");
        AbstractCustomer customer2 = CustomerFactory.getCustomer("Bob");
        AbstractCustomer customer3 = CustomerFactory.getCustomer("Julie");
        AbstractCustomer customer4 = CustomerFactory.getCustomer("Laura");

        System.out.println("Customers");
        System.out.println(customer1.getName());
        System.out.println(customer2.getName());
        System.out.println(customer3.getName());
        System.out.println(customer4.getName());
    }

}
